package com.lian.servlet;

import com.lian.dao.impl.productdaoimpl;
import com.lian.dao.impl.userdaoimpl;
import com.lian.dao.userdao;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by lenovo on 2018/8/7.
 */
public class AddIndexServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        userdao dao=new userdaoimpl();

        request.setAttribute("userx",dao.find());//查询安装员名字 新增加载处理数据
        request.setAttribute("procd",new productdaoimpl().findpro());//查询净水器名字 新增加载处理数据
        request.getRequestDispatcher("showadd.jsp").forward(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doPost(request,response);
    }
}
